package com.suixuan.support.log;

import com.suixuan.support.util.ConstantUtils;

/**
 * @Copyright (c) Nanjing Zhou Su co.,Ltd
 * 
 * @Project zhousuframework
 * @Title LogBean.java
 * @Package com.suixuan.log
 * @Description 日志描述
 * @Author suixuan
 * @Editors 1
 * @Date 2010-12-13 下午02:26:24
 * @Note
 * @Version:1.0.0
 * 
 */
public class LogBean {
	/**
	 * 记录日志类的类型
	 */
	private Class<?> clazz;
	/**
	 * 调用方法名
	 */
	private String methodName = ConstantUtils.EMPTY_STRING;
	/**
	 * 方法参数
	 */
	private Parameter[] parameter;
	/**
	 * 日志级别
	 */
	private LogConstant logConstant;

	/**
	 * 日志内容 可选
	 */
	private String[] message;

	public static class Parameter {
		private String parameter;
		private Object parameterValue;

		public Parameter(String parameter, Object parameterValue) {
			super();
			this.parameter = parameter;
			this.parameterValue = parameterValue;
		}

		public String getParameter() {
			return parameter;
		}

		public void setParameter(String parameter) {
			this.parameter = parameter;
		}

		public Object getParameterValue() {
			return parameterValue;
		}

		public void setParameterValue(Object parameterValue) {
			this.parameterValue = parameterValue;
		}

		@Override
		public String toString() {
			return parameter + " : " + parameterValue;
		}

	}

	public LogBean(Class<?> clazz, String methodName, Parameter[] parameter, LogConstant logConstant, String... message) {
		super();
		this.clazz = clazz;
		this.methodName = methodName;
		this.parameter = parameter;
		this.logConstant = logConstant;
		this.message = message;
	}

	public LogBean() {
		super();
	}

	public Class<?> getClazz() {
		return clazz;
	}

	public String getMethodName() {
		return methodName;
	}

	public Parameter[] getParameter() {
		return parameter;
	}

	public LogConstant getLogConstant() {
		return logConstant;
	}

	public String[] getMessage() {
		return message;
	}

}
